package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 心理问答栏目中的一条问题
 * </p>
 *
 * @author hyb
 * @since 2024-12-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class MessageBoard implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 话题主键id
     */
    @TableId(value = "issue_id", type = IdType.AUTO)
    private Integer issueId;

    /**
     * 话题的内容
     */
    private String text;

    /**
     * 话题的创建者id
     */
    private Integer createrId;

    /**
     * 0 不显示，1显示
     */
    private Integer isActive;

    /**
     * 记录最后更新时间
     */
    private LocalDateTime updateTime;

    /**
     * 记录创建时间
     */
    private LocalDateTime createTime;
    public MessageBoard(Integer issueId, String text, Integer createrId) {
        this.issueId = issueId;
        this.text = text;
        this.createrId = createrId;
        this.updateTime = LocalDateTime.now();
        this.createTime = LocalDateTime.now();
        this.isActive = 1;
    }


}
